package kit.edu.lego.gruppe3.levels;

import lejos.nxt.Motor;
import lejos.robotics.subsumption.Behavior;

public class MoveForward implements Behavior{
	
	private boolean suppressed = false;
	
	@Override
	public void action() {
		suppressed = false;
	    Motor.A.forward();
	    Motor.C.forward();
	    while( !suppressed ) 
	    	Thread.yield();
	    Motor.A.stop(); // clean up
	    Motor.C.stop();
	}

	@Override
	public void suppress() {
		suppressed = false;
	}

	@Override
	public boolean takeControl() {
		return true;
	}

}
